package Sub;

import java.util.ArrayList;

public class Sub_J24ProfessorSerivceImpl implements Sub_J24ProfessorService {

	private Sub_J24ProfessorDAO pdao;
	
	public Sub_J24ProfessorSerivceImpl() {
		pdao = new Sub_J24ProfessorDAOImpl();
	}
	
	@Override
	public void newProfessor() {
		Sub_J24ProfessorVO pvo = new Sub_J24ProfessorVO(null,null,null);
		System.out.println(pdao.insertProfessor( pvo ) );
	}

	@Override
	public void readProfessor() {
		ArrayList<Sub_J24ProfessorVO> pvoes = new ArrayList<>();
		pvoes = pdao.selectProfessor( );

		
		for( Sub_J24ProfessorVO p  : pvoes ) {
			System.out.println( p );
		}	
	}

	@Override
	public void readOneProfessor() {
		String pfno = "";
		ArrayList<Sub_J24ProfessorVO> pvoes = new ArrayList<>();
		pvoes = pdao.selectOneProfessor( pfno );
	}

	@Override
	public void modifyProfessor() {
		String pfno = "";
		System.out.println(pdao.updateProfessor( pfno ) );
	}

	@Override
	public void removeProfessor() {
		String pfno = "";
		System.out.println(pdao.deleteProfessor( pfno ) );
	}

}
